package cn.hn.tx.rebot.task.job;

public enum TaskType {

	// 新浪日志抓取
	CrawlBlog_Sina_Lady(0, "新浪日志抓取", "CrawlService_SinaEladies"),
	// 发布日志
	PublishBlog(1, "发布日志", null),
	// 更新日志热度
	UpdateBlogHot(2, "更新日志热度", null),
	// 刷新在线用户数量
	UpdateOnlineUsers(3, "刷新在线用户数量", null),
	// CrawlPoll
	CrawlPoll_Xeixe(4, "三情网投票抓取", null), 
	//日志评论抓取
	CrawlComment_Sina_Lady(5,
			"日志评论抓取", null),
	//发布日志评论
	PublishBlogComment(6,"发布日志评论",null);

	private final int type;
	private final String typeName;
	private final String impBean;

	private TaskType(int type, String typeName, String impBean) {
		this.type = type;
		this.typeName = typeName;
		this.impBean = impBean;
	}

	public int getType() {
		return type;
	}

	public String getTypeName() {
		return typeName;
	}

	public String getImpBean() {
		return impBean;
	}

	public static TaskType getTaskType(int type) {
		for (TaskType tt : TaskType.values()) {
			int t = tt.getType();
			if (t == type) {
				return tt;
			}
		}
		return null;
	}

}
